<%@ page language="java"  import="java.sql.*" pageEncoding="UTF-8" %>
<%@ include file="db.jsp"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        String teacherno = request.getParameter("teacherno");
        Connection connection = getConnection();
        String sql="update t_vote set vote=vote+1 where teacherno=?";
        PreparedStatement preparedStatement = connection.prepareStatement(sql);
        preparedStatement.setString(1,teacherno);
        preparedStatement.executeUpdate();
        preparedStatement.close();
        connection.close();
    %>
    <jsp:forward page="display.jsp"></jsp:forward>
</body>
</html>
